<template>
	<view class="page" :style="themeColor">
		<view class="flex align-stretch benben-position-layout flex balanceDetail_flex_0"
			:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
			<view class='flex align-center justify-between flex-sub balanceDetail_fd0_0'>
				<view class='flex align-center balanceDetail_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
					<text class='fu-iconfont2  balanceDetail_fd0_0_c0_c0'>&#xE794;</text>
				</view>
				<view class='flex align-center'>
					<text class='balanceDetail_fd0_0_c1_c0'>提现明细</text>
				</view>
				<view class='flex align-center justify-end balanceDetail_fd0_0_c2'>
					<!-- #ifdef APP-PLUS || H5 -->
					<image class='balanceDetail_fd0_0_c2_c0' :src='STATIC_URL+"163.png"'
						@tap.stop="popupShow1661324616108=true"></image>
					<!-- #endif -->
					
					<!-- #ifdef MP-WEIXIN -->
					<image style="transform: translateX(-170rpx);" class='balanceDetail_fd0_0_c2_c0' :src='STATIC_URL+"163.png"'
						@tap.stop="popupShow1661324616108=true"></image>
					<!-- #endif -->
				</view>
			</view>

		</view>
		<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>

		<benben-popup v-model="popupShow1661324616108" :mask="true" mode="center">
			<benben-calendar :query="benbenCalendar" @change="dateChange">
			</benben-calendar>
		</benben-popup>
		<!---余额明细列表flex布局开始-->
		<view class="loading_css" v-if="isShow">
			<u-loading size="36" color="#4177DD"></u-loading>
			<view>加载中</view>
		</view>
		
		<view class="flex flex-direction align-stretch benben-flex-layout balanceDetail_flex_3" v-else>
			<view class='flex align-center justify-between balanceDetail_fd3_0' v-for="(v, k) in list" :key="k">
				<view class='flex flex-direction align-stretch flex-sub balanceDetail_fd3_0_c0'>
					<text class='balanceDetail_fd3_0_c0_c0'>{{v.title}}</text>
					<text class='balanceDetail_fd3_0_c0_c1'>{{v.create_time}}</text>
				</view>
				<view>
					<view class='flex flex-wrap align-center balanceDetail_fd3_1_c1_c0'>
						<text class='balanceDetail_fd3_1_c1_c0_c1'>{{v.cash_fee}}</text>
					</view>
					<view class="status_1" v-if="v.check_status == 0">{{v.status_txt}}</view>
					<view class="status_2" v-if="v.check_status == 1">{{v.status_txt}}</view>
					<view class="status_3" v-if="v.check_status == 2">{{v.status_txt}}</view>
				</view>
			</view>
			<view class="loadmore" v-if="last_page > 1">
				<u-loadmore font-size="24" :status="status" :icon-type="iconType" :load-text="loadText" />
			</view>
		</view>
		<view class="noData" v-if="list.length == 0 && !isShow">
			<image src="/static/empty/no.png"></image>
		</view>
		<!---余额明细列表flex布局结束-->

	</view>
</template>
<script>
	export default {
		components: {},

		data() {
			return {
				"popupShow1661324616108": false,
				"benbenCalendar": {
					'width': 622,
					'background': '#ffffff',
					'borderRadius': '24rpx 24rpx 24rpx 24rpx',
					'mode': 'range',
					'future': false,
					'changeTitle': true,
					'changeYear': true,
					'changeMonth': true,
					'yearArrowColor': '#666666',
					'monthArrowColor': '#999999',
					'startText': '',
					'endText': '',
					'activeBgColor': '#3083FF',
					'rangeBgColor': '#D4E6FF'
				},
				"tabsInfofd1_0": {
					lineleft: '',
					lineWidth: '',
					moveX: 0,
					scrollX: 0,
					PageScrollX: 0
				},
				"tabs": "1",
				"list": [],
				"page": 1,
				"is_pull": true,
				"last_page": 1,
				"status": 'loadmore',
				"iconType": 'flower',
				"loadText": {
					loadmore: '轻轻上拉',
					loading: '努力加载中',
					nomore: '我也是有底线的'
				},
				"isShow": true,
				"start_time": "",
				"end_time": ""
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			this.getList();
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		// 下拉刷新
		onPullDownRefresh() {
			this.page = 1;
			this.is_pull = true;
			this.isShow = true;
			this.getList();
		},
		// 上拉加载
		onReachBottom() {
			if (this.page >= this.last_page) return;
			this.status = 'loading';
			this.page++;
			setTimeout(() => {
		
				if (this.page >= this.last_page) this.status = 'nomore';
				else this.status = 'loading';
				this.is_pull = false;
				this.getList();
			}, 500)
		},
		onPageScroll(e) {

		},
		methods: {
			// 余额记录  post6600d6353bbd1
			getList() {
				this.$api.post(global.apiUrls.post6600d6353bbd1, {
					page: this.page,
					start_time: this.start_time,
					end_time: this.end_time
				}).then(res => {
					// console.log(res);
					uni.stopPullDownRefresh();
					this.isShow = false;
					if (res.data.code == 1) {
						this.last_page = res.data.data.last_page;
						if (this.is_pull) {
							this.list = res.data.data.data;
						} else {
							this.list = this.list.concat(res.data.data.data);
						}
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			dateChange(e) {
				this.popupShow1661324616108 = false;
				this.start_time = e.start;
				this.end_time = e.end;
				this.page = 1;
				this.is_pull = true;
				this.isShow = true;
				this.getList();
			},
			tabChange(e) {
				this.page = 1;
				this.is_pull = true;
				this.isShow = true;
				this.getList();
			},
		}
	};
</script>
<style lang="scss" scoped>
	.status_1 {
		font-size: 24rpx;
		color: #333;
		text-align: right;
		margin-top: 10rpx;
	}
	.status_2 {
		font-size: 24rpx;
		color: #333;
		text-align: right;
		margin-top: 10rpx;
	}
	.status_3 {
		font-size: 24rpx;
		color: #F29423;
		text-align: right;
		margin-top: 10rpx;
	}
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #F8F8F8;
		background-size: 100% auto !important;
	}

	.balanceDetail_flex_0 {
		background: #fff;
		background-size: 100% !important;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.balanceDetail_fd0_0_c2_c0 {
		width: 32rpx;
		height: 32rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.balanceDetail_fd0_0_c2 {
		width: 180rpx;
	}

	.balanceDetail_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333;
	}

	.balanceDetail_fd0_0_c0_c0 {
		font-size: 32rpx;
		font-weight: 500;
		color: #333;
	}

	.balanceDetail_fd0_0_c0 {
		width: 180rpx;
	}

	.balanceDetail_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		line-height: 88rpx;
	}

	.balanceDetail_titlefd1_0_c4 {
		margin: 0rpx 120rpx 0rpx 0rpx;
	}

	.balanceDetail_titlefd1_0_c3 {
		margin: 0rpx 140rpx 0rpx 107rpx;
	}

	.balanceDetail_linefd1_0 {
		// background: url(https://huanqiuapp.niurenjianzhan.com/uploads/mini/96.png) no-repeat;
		background: #397BCE;
		background-size: 100% !important;
		width: 32rpx;
		height: 6rpx;
		top: 85rpx;
		background-size: 100% auto !important;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
	}

	.checkTitlefd1_0 {
		font-weight: 500 !important;
		font-size: 32rpx !important;
		color: #397BCE !important;
		background-color: rgba(255, 255, 255, 1) !important;
	}

	::v-deep .balanceDetail_benbenTabsfd1_0 {
		background: #fff;
		background-size: 100% !important;
		width: 750rpx;
		height: 94rpx;
		white-space: nowrap;
		text-align: center;
		font-size: 32rpx;
		font-weight: 500;
		color: #999999;
	}

	.balanceDetail_flex_3 {
		background: #fff;
		background-size: 100% !important;
		padding: 0rpx 30rpx 0rpx 34rpx;
		background-size: 100% auto !important;
	}

	.balanceDetail_fd3_1_c1_c0_c1 {
		color: #333333;
		font-size: 28rpx;
		font-weight: 700;
		line-height: 32rpx;
	}

	.balanceDetail_fd3_1_c1_c0_c0 {
		margin: 0rpx 8rpx 0rpx 0rpx;
		color: #999999;
		font-size: 28rpx;
		font-weight: 700;
		line-height: 32rpx;
	}

	.balanceDetail_fd3_1_c1_c0 {
		line-height: 39rpx;
		font-size: 32rpx;
		font-weight: 700;
		color: rgba(254, 59, 48, 1);
	}

	.balanceDetail_fd3_1_c0_c1 {
		margin: 16rpx 0rpx 0rpx 0rpx;
		line-height: 32rpx;
		font-size: 24rpx;
		font-weight: 400;
		color: #999999;
	}

	.balanceDetail_fd3_1_c0_c0 {
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		line-height: 42rpx;
		font-size: 28rpx;
		font-weight: 500;
		color: #333333;
	}

	.balanceDetail_fd3_1_c0 {
		margin: 0rpx 32rpx 0rpx 0rpx;
	}

	.balanceDetail_fd3_1 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.balanceDetail_fd3_0_c1_c0_c1 {
		color: #F02325;
		font-size: 28rpx;
		font-weight: 700;
		line-height: 32rpx;
	}

	.balanceDetail_fd3_0_c1_c0_c0 {
		margin: 0rpx 8rpx 0rpx 0rpx;
		color: #F02325;
		font-size: 28rpx;
		font-weight: 700;
		line-height: 32rpx;
	}

	.balanceDetail_fd3_0_c1_c0 {
		line-height: 39rpx;
		font-size: 32rpx;
		font-weight: 700;
		color: #333333;
	}

	.balanceDetail_fd3_0_c0_c1 {
		margin: 16rpx 0rpx 0rpx 0rpx;
		line-height: 32rpx;
		font-size: 24rpx;
		font-weight: 400;
		color: #999999;
	}

	.balanceDetail_fd3_0_c0_c0 {
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		line-height: 42rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
	}

	.balanceDetail_fd3_0_c0 {
		margin: 0rpx 32rpx 0rpx 0rpx;
	}

	.balanceDetail_fd3_0 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 32rpx 0rpx;
	}
</style>
